package com.example.date_save_test;

import android.app.Application;
import android.content.res.Configuration;
import android.util.Log;

import androidx.annotation.IdRes;
import androidx.annotation.NonNull;

import java.util.HashMap;

/**
 * @author: snjgm
 * data: 2022/7/22
 * description:
 */
public class MyApplication extends Application {
    private static MyApplication myApplication = null;

    public HashMap<String , String> infoMap = new HashMap<>();

    public static synchronized MyApplication getInstance(){
        if(myApplication == null){
            myApplication = new MyApplication();
        }
        return myApplication;
    }


    @Override
    public void onCreate() {
        super.onCreate();
        Log.d("NING","MyApplicationOncreate");
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        Log.d("NING","MyApplicationOnTeminate");
    }

    @Override
    public void onConfigurationChanged(@NonNull Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        Log.d("NING","MyApplicationOnConfigurationChanged");
    }
}
